
<div class="eject_con inform-reason">
    <div id="apply_warning"></div>
    <form id="inform_form" action="{:url('/circle/themeinform/index')}?c_id={$c_id}&t_id={$t_id}<?php if(!empty(I('get.r_id'))){echo '&r_id='.I('get.r_id');}?>" method="post" onsubmit="ajaxpost('inform_form', '{:url('circle/themeinform/index')}?c_id={$c_id}&t_id={$t_id}<?php if(!empty(I('get.r_id'))){echo '&r_id='.I('get.r_id');}?>', '', 'onerror');">
        <input type="hidden" name="form_submit" value="ok" />
        <dl>
            <dt>举报理由</dt>
            <dd>
                <h5>
                    <p>可选举报理由：</p>
                    <ul nctype="selectable">
                        <li style="display:blank;">广告</li>
                        <li style="display:blank;">恶意灌水</li>
                        <li style="display:blank;">违规内容</li>
                        <li style="display:blank;">文不对题</li>
                        <li style="display:blank;">重复发帖</li>
                    </ul>
                </h5>
                <p><textarea name="content" class="textarea" id="i_content"></textarea></p>
                <p><span class="count" id="i_contentcharcount"></span></p>
            </dd>
        </dl>
        <div class="bottom">
            <a class="submit-btn" nctype="inform_submit" href="Javascript: void(0)">提交</a>
            <a class="cancel-btn" nctype="inform_cancel" href="Javascript: void(0)">取消</a>
        </div>
    </form>
</div>
<script>
    $(function(){
        $('a[nctype="inform_submit"]').click(function(){
            $("#inform_form").submit();
        });
        $('a[nctype="inform_cancel"]').click(function(){
            DialogManager.close('inform');
        });
        $('ul[nctype="selectable"] > li').click(function(){
            $('#i_content').val($(this).html());
        });

        $.getScript('__SITE_RESOURCE__/js/jquery.charCount.js', function(){
            $("#i_content").charCount({
                allowed: 255,
                warning: 10,
                counterContainerID:'i_contentcharcount',
                firstCounterText:'还可以输入',
                endCounterText:'字',
                errorCounterText:'已经超出'
            });
        });
    });
</script>